
#ifndef SNAPGENERATOR_H
#define SNAPGENERATOR_H
#include "SpeedMonitor.h"
#include "Setting.h"
#include <qobject.h>
#include <qtimer.h>
class SnapGenerator : public QObject
{
	Q_OBJECT	
	public:
		SnapGenerator(SpeedMonitor* speedMonitor, Setting* setting);
		~SnapGenerator();

		public slots:
			void updateAccumulator();
			void carHappen();
			void cancelWarnning();

	signals:
		void snapCaculSignal();
	
	private:
			QTimer* m_timer;
			Setting* m_setting;
			SpeedMonitor* m_speedMonitor;
			int m_accum;

};
#endif
